﻿using BrnMall.WeiXin.Sdk;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Core.Sdk.WeiXin.Domain
{
    /// <summary>
    /// 添加房间入参
    /// </summary>
    public class AddLiveRoom
    {
        public string name { get; set; }

        public string coverImg { get; set; }
        /// <summary>
        ///  开始时间 时间戳
        /// </summary>
        public int startTime { get; set; }
        /// <summary>
        /// 结束时间 时间戳
        /// </summary>
        public int endTime { get; set; }
        /// <summary>
        /// 主播昵称
        /// </summary>
        public string anchorName { get; set; }
        /// <summary>
        /// 主播微信号
        /// </summary>
        public string anchorWechat { get; set; }
        /// <summary>
        /// 封面图片 mediaID
        /// </summary>
        public string shareImg { get; set; }
        /// <summary>
        /// 直播类型，1 推流 0 手机直播
        /// </summary>
        public int type { get; set; } = 0;
        /// <summary>
        /// 1：横屏 0：竖屏
        /// </summary>
        public int screenType { get; set; } = 0;
        /// <summary>
        /// 是否 关闭点赞 1 关闭
        /// </summary>
        public int closeLike { get; set; } = 0;
        /// <summary>
        /// 是否 关闭商品货架，1：关闭
        /// </summary>
        public int closeGoods { get; set; } = 0;
        /// <summary>
        ///是否 是否开启评论，1：关闭
        /// </summary>
        public int closeComment { get; set; } = 0;
        /// <summary>
        /// 直播回放：0：开启，1：关闭
        /// </summary>
        public int closeReplay { get; set; } = 0;
        /// <summary>
        /// 购物直播频道封面图
        /// </summary>
        public string feedsImg { get; set; }
    }

    /// <summary>
    /// 直播房间列表
    /// </summary>
    public class LiveRoomList : BaseResult
    {
        public List<LiveRoom> room_info { get; set; }
    }

    /// <summary>
    /// 直播房间
    /// </summary>
    public class LiveRoom 
    {
        /// <summary>
        /// 直播房间名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 主播名
        /// </summary>
        public string anchor_name { get; set; }
        /// <summary>
        /// 分享的图片
        /// </summary>
        public string share_img { get; set; }
        /// <summary>
        /// 房间id
        /// </summary>
        public int roomid { get; set; }
        /// <summary>
        /// 封面图片url
        /// </summary>
        public string cover_img { get; set; }
        /// <summary>
        /// 直播状态   101: 直播中, 102: 未开始, 103: 已结束, 104: 禁播, 105: 暂停中, 106: 异常，107:已过期
        /// </summary>
        public int live_status { get; set; }
        /// <summary>
        /// 直播开始时间(时间戳)
        /// </summary>
        public int start_time { get; set; }
        /// <summary>
        /// 直播结束时间
        /// </summary>
        public int end_time { get; set; }
        /// <summary>
        /// 直播商品
        /// </summary>
        public List<Goods> goods { get; set; }
    }

    /// <summary>
    /// 直播间商品
    /// </summary>
    public class Goods
    {
        /// <summary>
        /// 商品名
        /// </summary>
        public string name { get; set; } = "";
        /// <summary>
        /// 商品图片
        /// </summary>
        public string cover_img { get; set; } = "";
        /// <summary>
        /// 小程序页面链接
        /// </summary>
        public string url { get; set; } = "";
        /// <summary>
        /// 商品价格
        /// </summary>
        public decimal price { get; set; }
    }

    /// <summary>
    /// 添加商品入参
    /// </summary>
    public class AddLiveGoods
    {
        /// <summary>
        /// 商品id(修改用)
        /// </summary>
        public int goodsId { get; set; } = 0;
        /// <summary>
        /// 商品名
        /// </summary>
        public string name { get; set; }
        /// <summary>
        /// 商品图片
        /// </summary>
        public string coverImgUrl { get; set; }
        /// <summary>
        /// 价格类型，1：一口价（只需要传入price，price2不传） 
        ///           2：价格区间（price字段为左边界，price2字段为右边界，price和price2必传） 
        ///           3：显示折扣价（price字段为原价，price2字段为现价， price和price2必传）
        /// </summary>
        public int priceType { get; set; }
        /// <summary>
        /// 商品价格 (两位小数,单位元)
        /// </summary>
        public decimal price { get; set; }
        /// <summary>
        /// 小程序页面链接
        /// </summary>
        public string url { get; set; }
    }
    /// <summary>
    /// 添加商品入参
    /// </summary>
    public class AddLiveGoodsOut : BaseResult
    {
        /// <summary>
        /// 商品ID
        /// </summary>
        public int goodsId { get; set; }
        /// <summary>
        /// 审核单ID
        /// </summary>
        public int auditId { get; set; }
    }

    /// <summary>
    /// 商品列表
    /// </summary>
    public class GoodsListOut: BaseResult
    {
        /// <summary>
        /// 直播商品
        /// </summary>
        public List<GoodsDetail> goods { get; set; }
    }
    public class GoodsDetail
    {
        public int goods_id { get; set; }
        public string cover_img_url { get; set; }
        public string name { get; set; }
        public string price { get; set; }
        public string url { get; set; }
        public string price_type { get; set; }
        /// <summary>
        /// 审核状态(详情才显示) 0：未审核，1：审核中，2:审核通过，3审核失败
        /// </summary>
        public int audit_status { get; set; }
        /// <summary>
        /// 来源: 1、2：表示是为 API 添加商品,，否则是直播控制台添加的商品
        /// </summary>  
        public int third_party_tag { get; set; }
    }

    /// <summary>
    /// 回播列表
    /// </summary>
    public class LiveReplayOut: BaseResult
    {
        /// <summary>
        /// 
        /// </summary>
        public int total { get; set; }
        /// <summary>
        /// 直播的多个视频片段
        /// </summary>
        public List<LiveReplay> live_replay { get; set; }
    }
    public class LiveReplay
    {
        public string expire_time { get; set; }
        public string create_time { get; set; }
        public string media_url { get; set; }
    }
}
